<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    63. Unique Paths II
   </h1>
   <p>
    A robot is located at the top-left corner of a
    <em>
     m
    </em>
    x
    <em>
     n
    </em>
    grid (marked 'Start' in the diagram below).
   </p>
   <p>
    The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below).
   </p>
   <p>
    Now consider if some obstacles are added to the grids. How many unique paths would there be?
   </p>
   <p>
    <img src="https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png" style="width: 400px; height: 183px;">
   </p>
   <p>
    An obstacle and empty space is marked as
    <code>
     1
    </code>
    and
    <code>
     0
    </code>
    respectively in the grid.
   </p>
   <p>
    <strong>
     Note:
    </strong>
    <em>
     m
    </em>
    and
    <em>
     n
    </em>
    will be at most 100.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input:
</strong>[
&nbsp; [0,0,0],
&nbsp; [0,1,0],
&nbsp; [0,0,0]
]
<strong>Output:</strong> 2
<strong>Explanation:</strong>
There is one obstacle in the middle of the 3x3 grid above.
There are two ways to reach the bottom-right corner:
1. Right -&gt; Right -&gt; Down -&gt; Down
2. Down -&gt; Down -&gt; Right -&gt; Right
</pre>
  </div>
  <div>
   <h1 class="question_title">
    63. 不同路径 II
   </h1>
   <p>
    一个机器人位于一个
    <em>
     m x n
    </em>
    网格的左上角 （起始点在下图中标记为&ldquo;Start&rdquo; ）。
   </p>
   <p>
    机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角（在下图中标记为&ldquo;Finish&rdquo;）。
   </p>
   <p>
    现在考虑网格中有障碍物。那么从左上角到右下角将会有多少条不同的路径？
   </p>
   <p>
    <img src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2018/10/22/robot_maze.png" style="height: 183px; width: 400px;">
   </p>
   <p>
    网格中的障碍物和空位置分别用
    <code>
     1
    </code>
    和
    <code>
     0
    </code>
    来表示。
   </p>
   <p>
    <strong>
     说明：
    </strong>
    <em>
     m
    </em>
    &nbsp;和
    <em>
     n
    </em>
    的值均不超过 100。
   </p>
   <p>
    <strong>
     示例&nbsp;1:
    </strong>
   </p>
   <pre><strong>输入:
</strong>[
&nbsp; [0,0,0],
&nbsp; [0,1,0],
&nbsp; [0,0,0]
]
<strong>输出:</strong> 2
<strong>解释:</strong>
3x3 网格的正中间有一个障碍物。
从左上角到右下角一共有 <code>2</code> 条不同的路径：
1. 向右 -&gt; 向右 -&gt; 向下 -&gt; 向下
2. 向下 -&gt; 向下 -&gt; 向右 -&gt; 向右
</pre>
  </div>
 </body>
</html>